Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Using program variables and data types

Like most programming languages, the Progress 4GL lets you define program variables for use within a procedure. Here is the basic syntax:

DEFINE VARIABLE varname AS datatype. 

In this syntax, varname is the name of the variable, which must conform to the same rules as other names in the 4GL. (See the "Variable naming conventions" section for details.)

Progress supports a range of data types. Table 2–2 lists the basic ones. There are some other special data types available for more advanced programming, but these are enough to get you started.

Table 2–2: Basic supported data types
Data type name
Default display format
Default initial value
CHARACTER
X(8)
“” (the empty string)
DATE
99/99/99
? (the Unknown value, which displays as blank for dates)
DECIMAL
->>,>>9.99
0
HANDLE
>>>>>>9
? (the Unknown value)
INTEGER
->,>>>,>>9
0
LOGICAL
yes/no
no

Here are a few notes on Progress data types:


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095